#include "dem.h"

dem::dem(int width, int height)
{
	mData = new int *[width];
	for (int i = 0; i < width; i++)
	{
		mData[i] = new int[height];
		for (int j = 0; j < height; j++)
		{
			mData[i][j] = 0;
		}
	}
	mWidth = width;
	mHeight = height;
}

dem::~dem()
{
	for (int i = 0; i < mWidth; i++)
	{
		delete [] mData[i];
	}
	delete [] mData;
}

int dem::getCell(int row, int col)
{
	return mData[row][col];
}

void dem::setCell(int row, int col, int val)
{
	mData[row][col] = val;
}